
package com.fire.control.system.module.role.service;

import java.util.List;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;

import com.fire.control.system.dto.UserDTO;
import com.fire.control.system.entity.Resource;
import com.fire.control.system.entity.Role;
import com.fire.control.system.standard.BusinessInterfaceStandard;
import com.fire.control.system.support.protocol.comman.ResponseProtocol;
import com.fire.control.system.support.protocol.role.RoleRequestProtocol;

public interface IRoleService extends BusinessInterfaceStandard<RoleRequestProtocol, ResponseProtocol> {
	/**
	 * @author liuxincheng
	 * @Title: saveRole
	 * @Description: TODO(跳转到添加角色页面)
	 * @param @param protocol
	 * @param @return 设定文件
	 * @return ResponseProtocol 返回类型
	 * @throws null
	 */
	public ResponseProtocol getRoleAndResources(RoleRequestProtocol protocol,UserDTO user);

	/**
	 * @author liuxincheng
	 * @Title: saveRole
	 * @Description: TODO(添加角色)
	 * @param @param protocol
	 * @param @return 设定文件
	 * @return ResponseProtocol 返回类型
	 * @throws null
	 */
	public ResponseProtocol saveRole(RoleRequestProtocol protocol,UserDTO user);

	/**
	 * @author liuxincheng
	 * @Title: saveRole
	 * @Description: TODO(角色分配资源)
	 * @param @param protocol
	 * @param @return 设定文件
	 * @return ResponseProtocol 返回类型
	 * @throws null
	 */
	public ResponseProtocol roleDistributionResource(RoleRequestProtocol protocol);

	/**
	 * @Title: removeRole
	 * @Description: TODO
	 * @param protocol
	 * @param request
	 * @return
	 * @return: ResponseProtocol
	 */
	ResponseProtocol removeRole(RoleRequestProtocol protocol,HttpServletRequest request);

	/**
	 * @Title: getRoleResources
	 * @Description: TODO
	 * @param protocol
	 * @param request
	 * @return
	 * @return: ResponseProtocol
	 */
	Set<Resource> getResourceByRoleId(List<String> roleId);
	
	/**
	 * @author liuxincheng
	 * @Title: getAllRoles
	 * @Description: TODO(获取系统中所有角色)
	 * @param @return    设定文件
	 * @return List<Role>    返回类型
	 * @throws null
	 */
	List<Role> getAllRoles();
}
